package com.hz.airline.entity;


import com.alibaba.fastjson.annotation.JSONField;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by kevin on 2020/2/5 18:18
 */
@Entity
@Table(name = "t_user_order")
public class UserOrder {

    @Id
    @Column(name = "order_id")
    private String orderid;

    @Column(name = "flight_name")
    private String flightname;

    @Column(name = "flight_number_id")
    private String flightnumberid;

    @Column(name = "city")
    private String city;

    @Column(name = "endcity")
    private String endcity;

    @Column(name = "depart_date")
    private String departdate;

    @Column(name = "arrival_date")
    private String arrivaldate;

    @Column(name = "depart_terminal")
    private String departterminal;

    @Column(name = "arrival_terminal")
    private String arrivalterminal;

    @Column(name = "craft")
    private String craft;

    @Column(name = "food")
    private String food;

    @Column(name = "cabinname")
    private String cabinname;

    @Column(name = "ticket_price")
    private double ticketprice;

    @Column(name = "mileage")
    private double mileage;

    @Column(name = "miletime")
    private String miletime;

    @Column(name = "depart_time")
    private String departtime;

    @Column(name = "arrival_time")
    private String arrivaltime;

    @Column(name = "user_id")
    private String userid;

    @Column(name = "linkman_id")
    private int linkmanid;

    @Column(name = "changorder")
    private int changorder;

    @Column(name = "seat_number")
    private String seatnumber;

    @Column(name = "boarding_gate")
    private String boardinggate;

    @Column(name = "order_status")
    private int orderstatus;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "createtime", columnDefinition = "DATE")
    private Date createtime;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "updatetime", columnDefinition = "DATE")
    private Date updatetime;

    @Column(name = "passenger_id")
    private int passengerid;

    @Transient
    private String username;

    @Transient
    private String idnumber;

    public String getFlightnumberid() {
        return flightnumberid;
    }

    public void setFlightnumberid(String flightnumberid) {
        this.flightnumberid = flightnumberid;
    }

    public String getOrderid() {
        return orderid;
    }

    public void setOrderid(String orderid) {
        this.orderid = orderid;
    }

    public String getFlightname() {
        return flightname;
    }

    public void setFlightname(String flightname) {
        this.flightname = flightname;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getEndcity() {
        return endcity;
    }

    public void setEndcity(String endcity) {
        this.endcity = endcity;
    }

    public String getDepartdate() {
        return departdate;
    }

    public void setDepartdate(String departdate) {
        this.departdate = departdate;
    }

    public String getArrivaldate() {
        return arrivaldate;
    }

    public void setArrivaldate(String arrivaldate) {
        this.arrivaldate = arrivaldate;
    }

    public String getDepartterminal() {
        return departterminal;
    }

    public void setDepartterminal(String departterminal) {
        this.departterminal = departterminal;
    }

    public String getArrivalterminal() {
        return arrivalterminal;
    }

    public void setArrivalterminal(String arrivalterminal) {
        this.arrivalterminal = arrivalterminal;
    }

    public String getCraft() {
        return craft;
    }

    public void setCraft(String craft) {
        this.craft = craft;
    }

    public String getFood() {
        return food;
    }

    public void setFood(String food) {
        this.food = food;
    }

    public String getCabinname() {
        return cabinname;
    }

    public void setCabinname(String cabinname) {
        this.cabinname = cabinname;
    }

    public double getTicketprice() {
        return ticketprice;
    }

    public void setTicketprice(double ticketprice) {
        this.ticketprice = ticketprice;
    }

    public double getMileage() {
        return mileage;
    }

    public void setMileage(double mileage) {
        this.mileage = mileage;
    }

    public String getMiletime() {
        return miletime;
    }

    public void setMiletime(String miletime) {
        this.miletime = miletime;
    }

    public String getDeparttime() {
        return departtime;
    }

    public void setDeparttime(String departtime) {
        this.departtime = departtime;
    }

    public String getArrivaltime() {
        return arrivaltime;
    }

    public void setArrivaltime(String arrivaltime) {
        this.arrivaltime = arrivaltime;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getSeatnumber() {
        return seatnumber;
    }

    public void setSeatnumber(String seatnumber) {
        this.seatnumber = seatnumber;
    }

    public String getBoardinggate() {
        return boardinggate;
    }

    public void setBoardinggate(String boardinggate) {
        this.boardinggate = boardinggate;
    }

    public int getOrderstatus() {
        return orderstatus;
    }

    public void setOrderstatus(int orderstatus) {
        this.orderstatus = orderstatus;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public int getLinkmanid() {
        return linkmanid;
    }

    public void setLinkmanid(int linkmanid) {
        this.linkmanid = linkmanid;
    }

    public int getPassengerid() {
        return passengerid;
    }

    public void setPassengerid(int passengerid) {
        this.passengerid = passengerid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIdnumber() {
        return idnumber;
    }

    public void setIdnumber(String idnumber) {
        this.idnumber = idnumber;
    }

    public int getChangorder() {
        return changorder;
    }

    public void setChangorder(int changorder) {
        this.changorder = changorder;
    }

    @Override
    public String toString() {
        return "UserOrder{" +
                "orderid='" + orderid + '\'' +
                ", flightname='" + flightname + '\'' +
                ", flightnumberid='" + flightnumberid + '\'' +
                ", city='" + city + '\'' +
                ", endcity='" + endcity + '\'' +
                ", departdate='" + departdate + '\'' +
                ", arrivaldate='" + arrivaldate + '\'' +
                ", departterminal='" + departterminal + '\'' +
                ", arrivalterminal='" + arrivalterminal + '\'' +
                ", craft='" + craft + '\'' +
                ", food='" + food + '\'' +
                ", cabinname='" + cabinname + '\'' +
                ", ticketprice=" + ticketprice +
                ", mileage=" + mileage +
                ", miletime='" + miletime + '\'' +
                ", departtime='" + departtime + '\'' +
                ", arrivaltime='" + arrivaltime + '\'' +
                ", userid='" + userid + '\'' +
                ", linkmanid=" + linkmanid +
                ", changorder=" + changorder +
                ", seatnumber='" + seatnumber + '\'' +
                ", boardinggate='" + boardinggate + '\'' +
                ", orderstatus=" + orderstatus +
                ", createtime=" + createtime +
                ", updatetime=" + updatetime +
                ", passengerid=" + passengerid +
                ", username='" + username + '\'' +
                ", idnumber='" + idnumber + '\'' +
                '}';
    }
}
